package com.mf.all.entity.req;

import java.io.Serial;

import com.baomidou.mybatisplus.annotation.TableField;
import com.mf.all.entity.dto.DtoWarehouseArea;
import com.mf.all.groups.GroupsAddInterface;
import com.mf.all.groups.GroupsUpdateInterface;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Null;
import lombok.Data;

import java.io.Serializable;
import java.util.List;

/**
 * 仓库管理提交
 *
 * @date 2025-04-02 22:36:45
 */
@Data
public class ReqWarehouse implements Serializable {
    @Serial
    private static final long serialVersionUID = 1L;
    @NotNull(message = "id不能为空", groups = {GroupsUpdateInterface.class})
    @Null(message = "id必须为空", groups = {GroupsAddInterface.class})
    private Integer id;

    @Schema(description = "仓库名称")
    @NotBlank(message = "仓库名称不能为空", groups = {GroupsAddInterface.class, GroupsUpdateInterface.class})
    private String wName;

    @Schema(description = "入库类型")
    @NotBlank(message = "仓库名称不能为空", groups = {GroupsAddInterface.class, GroupsUpdateInterface.class})
    private String type;

    @Schema(description = "描述")
    private String description;

    @TableField(exist = false)
    private List<DtoWarehouseArea> children;
}
